//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    internal class LineJoinMiterProperties : LineJoinProperties
    {
        private int lim; //\\percent        

        public int Limit
        {
            get { return lim; }
            set { lim = value; }
        }

        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read("miter"))
            {
                Limit = c.GetOptionalInteger("lim", 0); //\\0 OK?
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write("miter"))
            {
                c.SetOptionalInteger("lim", Limit, 0); //\\0 OK?
            }
        }
    }
}